<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <script>

        //trim();去除前后的空格
//        var str = "     你好  我很好！     ";
//        console.log(str);
//        console.log(str.trim());

        //replace(); 替换和全局替换值。
//        var str = "Today is fine day,today is fine day!"
//        console.log(str);
//        console.log(str.replace(/today/ig,"tomorrow"));


        //search();  给字符查索引
//         var str = "abcdefg";
//         console.log(str.search(/bc/));
//         console.log(str.indexOf("bc"));

		var str = "   ji   ";
		console.log(str);
		console.log(str.trim());
		
		var str = "Today is fine day,today is fine day!"
		console.log(str);
		console.log(str.replace(/today/ig,"tomorrow"));
		
		var str = "abcdefg";
		console.log(str.search(/bc/));
		console.log(str.indexOf("bc"));
    </script>
</body>
</html>